package com.yuhs.zixing.study.design.pattern.dp002.create.c002.factory.f004;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/4/25 9:28 PM
 */
public class NvWa {

    public static void main(String[] args) {
        //第一条生产线，男性生产线
        HumanFactory004 maleHumanFactory = new MaleFactory004();
        //第二条生产线，女性生产线
        HumanFactory004 femaleHumanFactory = new FemaleFactory004();
        //生产线建立完毕，开始生产人了:
        Human004 maleYellowHuman = maleHumanFactory.createYellowHuman();
        Human004 femaleYellowHuman = femaleHumanFactory.createYellowHuman();
        System.out.println("---生产一个黄色女性---");
        femaleYellowHuman.getColor();
        femaleYellowHuman.talk();
        femaleYellowHuman.getSex();
        System.out.println("\n---生产一个黄色男性---");
        maleYellowHuman.getColor();
        maleYellowHuman.talk();
        maleYellowHuman.getSex();
        /*
         * ......
         * 后面继续创建
         */
    }
}
